<#--<@pager preUrl page pageCount -->
<#macro pager preUrl page pageCount>
	<#if pageCount &gt;1>
		<#assign selected = page?number>
		<#assign startPage = selected - 5>
		<#assign endPage = selected + 4>
		<#if startPage &lt; 1>
			<#assign startPage = 1>
			<#assign endPage = selected + 9>
		</#if>
		<#if endPage &gt; pageCount>
			<#assign endPage = pageCount>
		</#if>				
		
		<#if selected &gt; 1>
			<a page="${selected - 1}" class="btn_p" href="${preUrl?replace('{page}', (selected - 1))}">Prev</a>
		<#else>
			<span class="btn_p">Prev</span>
		</#if>
		<#list startPage..endPage as num>
			<#if selected == num>
				<strong page="${num}">${num}</strong>
			<#else>
				<a page="${num}" href="${preUrl?replace('{page}', num)}">${num}</a>
			</#if>
		</#list>
		<#if selected &lt; pageCount>
			<a page="${selected + 1}" class="btn_n" href="${preUrl?replace('{page}', (selected + 1))}">Next</a>
		<#else>
			<span class="btn_n">Next</span>
		</#if>
	</#if>
</#macro>